/*
	YoghurtGum - 2D Game Engine

	Copyright 2009-2011 Quinten Lansu
	
	Licensed under the Apache License, Version 2.0 (the "License"); you may not 
	use this file except in compliance with the License. You may obtain a copy 
	of the License at 
		
		http://www.apache.org/licenses/LICENSE-2.0 
		
	Unless required by applicable law or agreed to in writing, software 
	distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
	License for the specific language governing permissions and limitations 
	under the License. 
*/

#ifndef _YGSPRITEEX_H_
#define _YGSPRITEEX_H_

#include "YGSprite.h"

namespace YoghurtGum
{

	class SpriteEx : public Sprite
	{

	public:

		SpriteEx(float a_Delay);
		~SpriteEx();

		void SetDelay(float a_Delay)  { m_Delay = a_Delay; }
		float GetDelay()              { return m_Delay; }

		virtual void SetCenter(int a_X = -1, int a_Y = -1) = 0;

		virtual void Scale(float a_RatioX, float a_RatioY) = 0;
		virtual void Rotate(float a_Degrees) = 0;

		virtual void Draw(float a_X, float a_Y, int a_Frame = -1, float a_Depth = 0.f) = 0;

		void Tick(float a_DeltaTime);

		virtual void PrevFrame() = 0;
		virtual void NextFrame() = 0;

		virtual Surface* ToSurface(int a_Frame = -1) = 0;

	protected:

		int m_Total, m_Current;
		float m_Delay;
		float m_Time;
		
	}; // class SpriteEx

}; // namespace YoghurtGum

#endif